#pragma once

class ConfigFile
{
	std::string mFileName;
	std::map<std::string, std::string> mConfigValues;
public:
	ConfigFile(const std::string& fileName);
	bool Parse(std::string& error);
	bool ContainsKey(const std::string& key);
	std::string GetValue(const std::string& key);
	bool getBoolean(const std::string& key) {
		std::stringstream strm;
		strm << GetValue(key);
		bool ret = false;
		strm >> ret;
		return ret;
	}

private:
	static ConfigFile cfgMain;
	static bool mConfigsLoaded;

public:
	static bool LoadConfigs();
	static ConfigFile& Main() { return cfgMain; }
};